<?php
include("common.inc.php");
require dirname(__FILE__).'/ip_area/area.inc.php';
$clientip=$_SERVER["REMOTE_ADDR"]; 
$clientcity=convertip($clientip);
//print_r($clientcity);
//print_r($_citylist);
$find=$findcid=0;
foreach($_citylist as $row){
	if (findstr($clientcity,$row['cityname'])){$find=1;$findcid=$row['cid'];}
}
if($find==1){dheader("index.php?cityid=".$findcid);}else{dheader("index.php");}
?>